-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDataFlow.h
More file actions
75 lines (65 loc) · 1.66 KB
/
DataFlow.h
File metadata and controls
75 lines (65 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef DATAFLOW_H_
#define DATAFLOW_H_
#include <TRandom3.h>
#include <TFile.h>
#include <TH1I.h>
#include <TH2I.h>
#include <TString.h>
#include "Module.h"
#include <iostream>
#include <fstream>
#include <streambuf>
#include "Event.h"
#include "EventReader.h"
#include <map>
#include <list>
//
// general settings
//
long MAX_EVENT; // #events to be processed
double TRIGGER_RATE; // L1 trigger rate in kHz
double SIGNAL_XSECTION; // signal (jet) X-section in mb
double TOTAL_XSECTION; // MinBias X-section in mb
double PEAK_LUMI; // in 10^34
long WBC; // trigger latency
int LAYER;
int MIN_MOD, MAX_MOD;
int DETECTOR;
int LADDER;
std::list<std::string> SignalFileNames;
std::list<std::string> MinBiasFileNames;
bool CreatePileUp;
int BUNCH_SPACING;
//
// module and ROC settings
//
int LINKS_PER_MODULE;
int CHIPS_PER_MODULE;
int CHIPS_PER_LINK[2];
//
// method declarations
//
bool GetMBHit(Event &event);
bool GetSignalHit(Event &event);
void Init(bool* EmptyBC);
void ReadSettings(char* fileName);
void FillHisto(hit_vector &hits, int trigger);
void WriteHits();
//
// variable declarations
//
const std::string SOFTWARE_VERSION="V2.0 23-Aug-2012 no TAG";
Event event;
int layer,module[4];
long clk;
std::ofstream hitFile;
TFile *histoFile;
TH1I *h1, *h2, *h3, *h4, *h5;
TH1I *g1, *g2, *g3, *g4, *g5;
TH1I *rodelay, *rotime, *eventsize;
TH2I *allhits;
TH2I *ExtTokenWait, *IntTokenWait, *DcolTokenWait, *DCTokenWait;
TH1I *DBSize, *TSSize;
bool WriteHisto;
TString HistoFileName;
#endif /*DATAFLOW_H_*/