31 #ifndef ADF_AgataKeyFactory
55 Watcher(
"ADFWatcher",
"ADFWatcher"),
58 ADFWatcher(
const char *name,
const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0):
59 Watcher(name,title,sp_dir,tag_dir), fFrame(0x0)
84 Dumper(
const char *name =
"Dumper",
const char *title =
"Just dump the frames in a file"):
86 fFilename(Form(
"%s.adf",name)),
89 Dumper(
const char *name,
const char *title, TDirectory *sp_dir, TDirectory *tag_dir):
91 fFilename(Form(
"%s.adf",name)),
99 void SetOutputFile(
const Char_t *filename);
102 virtual void Exec(Option_t *option=
"");
117 static const Int_t kMaxCycle = 1000u;
122 TRegexp fSubKeyFilter;
126 UInt_t fLastEventNumber;
128 ULong64_t flastTimestamp;
131 Bool_t fShowGlobalConf;
140 TH1F *fCoincTimeStamp;
142 TH1F *fLengthSubFrame;
143 TH1F *fKeyMessageSubFrame;
147 virtual void DoCanvas(TCanvas *c, Option_t *);
150 AgataKeyWatcher(
const Char_t *name,
const Char_t *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
154 void SetKeyFilter(
const Char_t *keypattern =
"*",
const Char_t *subkeypattern =
"*");
159 virtual void Exec(Option_t *option=
"");
175 std::vector < ULong64_t > fTSRates;
178 TSRate(
const Char_t *name,
const Char_t *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
186 virtual void Exec(Option_t *option=
"");
199 static const ULong64_t fgkOneSecond = 100000000UL;
209 std::vector<ULong64_t> fPrecision;
210 std::vector<Int_t> fNbSamples;
213 D_Rate(): fNbScales(0), fPrecision(0), fNbSamples(0)
216 void Add(ULong64_t precision, Int_t nb_samples)
218 fNbScales++; fPrecision.push_back(precision); fNbSamples.push_back(nb_samples);
224 std::vector<ULong64_t> fCycle;
225 std::vector<Int_t> fNbCounts;
226 std::vector<Double_t> fSum;
230 C_Rate(Int_t nb_scales = 1): fCycle(0), fNbCounts(0), fSum(0), fLastTS(0UL)
231 { Reset(nb_scales) ; }
233 { fCycle.resize(nb_scales,0); fNbCounts.resize(nb_scales,0); fSum.resize(nb_scales,0); fLastTS = 0UL; }
238 D_Rate fDefinitionRate;
240 std::vector<C_Rate> fCurrentRate;
248 static const Short_t gEmptyBins = 50 ;
252 TObjArray fPacketWidth;
265 virtual void DoCanvas(TCanvas *c, Option_t *);
268 TSRateCollector(
const Char_t *name,
const Char_t *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
273 void AddHook(
Watcher *,
const char *);
276 virtual void Exec(Option_t *option=
"");
286 ULong64_t FirstTimeStamp;
287 ULong64_t LastTimeStamp;
291 virtual void DoCanvas(TCanvas *c, Option_t *);
294 TimeStampWatcher(
const char * name,
const char * title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
297 virtual void Exec(Option_t * option=
"");
299 virtual void Zero(Option_t *opt1, Option_t *opt2);
Just dump the frame in a file.
Watcher to keep last TS values.
ADFWatcher(const char *name, const char *title, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
Dumper(const char *name="Dumper", const char *title="Just dump the frames in a file")
Base class for a Watcher.
virtual ~TSRateCollector()
To check and display the Data Flow structure by the key content of the frame.
C_Rate(Int_t nb_scales=1)
Dumper(const char *name, const char *title, TDirectory *sp_dir, TDirectory *tag_dir)
header file for AgataKeyFactory.cpp
void Add(ULong64_t precision, Int_t nb_samples)
precision is given in TS unit (use fgkOneSecond for conversion)
Base class for a trigger on a data flow.
void Reset(Int_t nb_scales=1)
Base Watcher working for any kind of Frame (Frame interface)
std::vector< ULong64_t > & LastValues()
compute histograms for several TSRate