Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcConfigEvtHandler.h
Go to the documentation of this file.
1#ifndef THcConfigEvtHandler_
2#define THcConfigEvtHandler_
3
5//
6// THcConfigEvtHandler
7// For more details see the implementation file.
8// This handles hall C's event type 125.
9// Author Stephen Wood, Feb 2017 - Dec 2018.
10// Partly rewritten by Ole Hansen, Aug/Sep 2023.
11//
13
14#include "THaEvtTypeHandler.h"
15#include <string>
16#include <vector>
17#include <map>
18#include <array>
19
21
22public:
23
24 THcConfigEvtHandler(const char* name, const char* description);
27 virtual ~THcConfigEvtHandler();
28
29 virtual Int_t Analyze( THaEvData* evdata );
30 virtual void PrintConfig();
31 Bool_t IsPresent( UInt_t crate );
32 UInt_t GetNSA( UInt_t crate );
33 UInt_t GetNSB( UInt_t crate );
34 UInt_t GetNPED( UInt_t crate );
35 virtual EStatus Init( const TDatime& run_time );
36 // Float_t GetData(const std::string& tag);
37 virtual void MakeParms( UInt_t roc );
38
39private:
40
41 // Number of FADC250 thresholds
42 static constexpr UInt_t NTHR = 16;
43 static constexpr UInt_t NPS = 6;
44
89
90 std::map<UInt_t, CrateConfig> fCrateInfoMap; // roc -> crate info
91 std::vector<std::string> fParms; // names of parameters we've defined
92
98 CrateConfig::TI_t& cfg );
99
100 ClassDef(THcConfigEvtHandler,0) // Hall C event type 125
101
102};
103
104#endif
int Int_t
unsigned int UInt_t
bool Bool_t
#define ClassDef(name, id)
Analyze Hall C Configuration events. (Event type 125).
UInt_t DecodeCAEN1190Config(THaEvData *evdata, UInt_t ip, UInt_t len, CrateConfig::CAEN1190_t &cfg)
static constexpr UInt_t NTHR
std::vector< std::string > fParms
Bool_t IsPresent(UInt_t crate)
UInt_t GetNSA(UInt_t crate)
THcConfigEvtHandler(const THcConfigEvtHandler &fh)=delete
virtual Int_t Analyze(THaEvData *evdata)
virtual void MakeParms(UInt_t roc)
static constexpr UInt_t NPS
UInt_t GetNSB(UInt_t crate)
std::map< UInt_t, CrateConfig > fCrateInfoMap
THcConfigEvtHandler & operator=(const THcConfigEvtHandler &fh)=delete
UInt_t GetNPED(UInt_t crate)
UInt_t DecodeTIConfig(THaEvData *evdata, UInt_t ip, UInt_t len, CrateConfig::TI_t &cfg)
UInt_t DecodeFADC250Config(THaEvData *evdata, UInt_t ip, UInt_t len, CrateConfig::FADC250_t &cfg)
std::map< UInt_t, std::array< UInt_t, NTHR > > thresholds
struct THcConfigEvtHandler::CrateConfig::FADC250 FADC250_t
Int_t MakeParms(THcConfigEvtHandler &h) const
struct THcConfigEvtHandler::CrateConfig::CAEN1190 CAEN1190_t
struct THcConfigEvtHandler::CrateConfig::TI TI_t