43 Bool_t local_debug =
false;
54 std::string key, value;
56 if ( value.size() > 0) {
74 else if (key ==
"param" ) {
79 else if (key ==
"eventcut") {
84 else if (key ==
"geom" ) {
89 else if (key ==
"cross" ) {
94 else if (key ==
"mask") {
165 for (Int_t i=0; i<roc_index; i++){
189 std::vector<BankID_t> tmpvec(1,bank_id);
195 if (bank_index==-1) {
200 QwError << std::hex <<
"VQwSubsystem::RegisterROCNumber: "
201 <<
"This subbank (0x" << bank_id <<
") "
202 <<
"in this ROC (0x" << roc_id <<
") "
203 <<
"has already been registered!"
227 QwError << std::hex <<
"VQwSubsystem::RegisterSubbank: "
228 <<
"This subbank (" << bank_id <<
") "
229 <<
"does not have an associated ROC! "
230 <<
"Add a 'ROC=#' line to the map file."
243 static BankID_t bankIDmask = 0xffffffff;
248 fMarkerWords.at(roc_index).at(bank_index).push_back(markerword);
254 QwError << std::hex <<
"VQwSubsystem::RegisterSubbank: "
255 <<
"This Marker word (" << markerword <<
") "
256 <<
"does not have an associated ROC! "
257 <<
"Add a 'ROC=#' line to the map file."
272 if (mapstr.
PopValue(
"bank",value)) {
275 if (mapstr.
PopValue(
"markerword",value)) {
283 std::cout <<
"Name of this subsystem: " <<
fSystemName << std::endl;
284 for (
size_t roc_index = 0; roc_index <
fROC_IDs.size(); roc_index++) {
285 std::cout <<
"ROC" << std::dec <<
fROC_IDs[roc_index] <<
": ";
286 for (
size_t bank_index = 0; bank_index <
fBank_IDs[roc_index].size(); bank_index++)
287 std::cout << std::hex <<
"0x" <<
fBank_IDs[roc_index][bank_index] <<
" ";
288 std::cout << std::dec << std::endl;
290 std::cout <<
"in array " << std::hex <<
GetParent() << std::dec << std::endl;
321 Bool_t local_debug =
false;
324 <<
" uses the following map files:" <<
QwLog::endl;
331 for (std::map<TString,TString>::const_iterator ii =
fDetectorMaps.begin();
335 TString name = (*ii).first;
336 TString all = (*ii).second;
Definition of the pure virtual base class of all subsystems.
A logfile class, based on an identical class in the Hermes analyzer.
#define QwError
Predefined log drain for errors.
#define QwMessage
Predefined log drain for regular messages.
Array container for managing multiple subsystems.
Parameter file parsing and management.
static const BankID_t kNullBankID
static const ROCID_t kNullROCID
Bank ID will combine both bank and marker words.
QwSubsystemArray * GetParent() const
static std::ostream & endl(std::ostream &)
End of the line.
Configuration file parser with flexible tokenization and search capabilities.
Bool_t PopValue(const std::string keyname, T &retvalue)
void TrimWhitespace(TString::EStripType head_tail=TString::kBoth)
Bool_t HasVariablePair(const std::string &separatorchars, std::string &varname, std::string &varvalue)
void TrimComment(const char commentchar)
static UInt_t GetUInt(const TString &varvalue)
Container for managing multiple subsystems with common operations.
virtual VQwSubsystem * GetSubsystemByName(const TString &name)
Get the subsystem with the specified name.
virtual Int_t RegisterROCNumber(const ROCID_t roc_id, const BankID_t bank_id=0)
Tell the object that it will decode data from this ROC and sub-bank.
std::vector< ROCID_t > fROC_IDs
Vector of ROC IDs associated with this subsystem.
virtual Int_t LoadChannelMap(TString mapfile)=0
Mandatory map file definition.
BankID_t fCurrentBank_ID
Bank ID (and Marker word) that is currently being processed;.
virtual std::map< TString, TString > GetDetectorMaps()
TString fSystemName
Name of this subsystem.
Int_t GetSubbankIndex() const
std::vector< TString > fDetectorMapsNames
Names of loaded detector map files.
std::vector< std::vector< BankID_t > > fBank_IDs
Vector of Bank IDs per ROC ID associated with this subsystem.
void SetEventTypeMask(const UInt_t mask)
Set event type mask.
virtual VQwSubsystem & operator=(VQwSubsystem *value)
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsy...
virtual void PrintInfo() const
Print some information about the subsystem.
void RegisterRocBankMarker(QwParameterFile &mapstr)
virtual Int_t LoadEventCuts(TString)
Optional event cut file.
virtual Int_t LoadGeometryDefinition(TString)
Optional geometry definition.
Bool_t fIsDataLoaded
Has this subsystem gotten data to be processed?
virtual Int_t LoadDetectorMaps(QwParameterFile &file)
Parse parameter file to find the map files.
Int_t FindIndex(const std::vector< T > &myvec, const T value) const
Int_t RegisterMarkerWord(const UInt_t markerword)
virtual std::vector< TString > GetParamFileNameList()
std::map< TString, TString > fDetectorMaps
Map of file name to full path or content.
void ClearAllBankRegistrations()
Clear all registration of ROC and Bank IDs for this subsystem.
virtual Int_t LoadInputParameters(TString mapfile)=0
Mandatory parameter file definition.
virtual void PrintDetectorMaps(Bool_t status) const
VQwSubsystem(const TString &name)
Constructor with name.
Int_t RegisterSubbank(const BankID_t bank_id)
Tell the object that it will decode data from this sub-bank in the ROC currently open for registratio...
virtual Int_t LoadCrosstalkDefinition(TString)
Optional crosstalk definition.
ROCID_t fCurrentROC_ID
ROC ID that is currently being processed.
std::vector< std::vector< std::vector< UInt_t > > > fMarkerWords
Vector of marker words per ROC & subbank associated with this subsystem.
VQwSubsystem * GetSibling(const std::string &name) const
Get the sibling with specified name.