#include <RawBlockId.h>
Public Member Functions | |
| RawBlockId () | |
| RawBlockId (Int_t major, Int_t minor, Bool_t isDCS, Detector::Detector_t detector, SimFlag::SimFlag_t simflag) | |
| virtual | ~RawBlockId () |
| RawBlockId (const Int_t encoded) | |
| Int_t | GetEncoded () const |
| const Char_t * | AsString (Option_t *option="") const |
| Int_t | GetMajor () const |
| const Char_t * | GetMajorAsString () const |
| Int_t | GetMinor () const |
| Bool_t | IsDCS () const |
| Detector::Detector_t | GetDetector () const |
| SimFlag::SimFlag_t | GetSimFlag () const |
| void | Print (Option_t *option="") const |
| virtual std::ostream & | FormatToOStream (std::ostream &os, Option_t *option="") const |
Protected Attributes | |
| Int_t | fEncoded |
Friends | |
| Bool_t | operator== (const RawBlockId &lhs, const RawBlockId &rhs) |
| Bool_t | operator!= (const RawBlockId &lhs, const RawBlockId &rhs) |
|
|
Definition at line 107 of file RawBlockId.h. References defaultRawBlockId. 00107 : fEncoded(defaultRawBlockId) { ; }
|
|
||||||||||||||||||||||||
|
Definition at line 35 of file RawBlockId.cxx. References SimFlag::Compact(), fEncoded, and maskRawBlkIdIsDCS. 00038 : fEncoded(0) 00039 { 00040 // Normal ctor 00041 00042 Int_t cmptSimFlag = SimFlag::Compact(simflag); 00043 00044 fEncoded = 00045 ((cmptSimFlag << shiftRawBlkIdCSimFlag) & maskRawBlkIdCSimFlag) | 00046 (( detector << shiftRawBlkIdDetector) & maskRawBlkIdDetector) | 00047 ((isDCS) ? maskRawBlkIdIsDCS : 0) | 00048 (( major << shiftRawBlkIdMajor) & maskRawBlkIdMajor) | 00049 (( minor << shiftRawBlkIdMinor) & maskRawBlkIdMinor); 00050 00051 }
|
|
|
Definition at line 108 of file RawBlockId.h. 00108 { ; }
|
|
|
Definition at line 110 of file RawBlockId.h. 00110 : fEncoded(encoded) { ; }
|
|
|
Definition at line 54 of file RawBlockId.cxx. References GetDetector(), GetMajor(), GetMajorAsString(), GetMinor(), GetSimFlag(), IsDCS(), and option. Referenced by RotoObjectifier::BufferInflate(), RawVaTimingMonitorBlock::FillRawDigits(), RawLiTpmtDigitsBlock::FillRawDigits(), RawDigitDataBlock::FillRawDigits(), RawTOFBlock::FillRawTOFDigits(), RerootToRawDataModule::FinalizeWorkingArray(), RawDataBlock::FormatToOStream(), and FormatToOStream(). 00055 {
00056 // Return unpacked RawBlockId as a string
00057 // User should copy result because it points to a
00058 // statically allocated string.
00059 // Internally uses a circular list of buffers to avoid problems
00060 // using AsString multiple times in a cout-like situation.
00061
00062 const int nbuffers = 8; // use a circular list of strings
00063 static char newstring[nbuffers][128];
00064 static int ibuffer = nbuffers;
00065 ibuffer = (ibuffer+1)%nbuffers; // each time move to next buffer
00066
00067 switch (option[0]) {
00068 case 'c':
00069 // compact rendering "DCS:225;225(F+D)"
00070 sprintf(newstring[ibuffer],"%3s:%3.3d;%3.3d(%1.1s+%1.1s)"
00071 ,(IsDCS() ? "DCS" : "DAQ")
00072 ,GetMajor(),GetMinor()
00073 ,Detector::AsString(GetDetector())
00074 ,SimFlag::AsString(GetSimFlag())
00075 );
00076 break;
00077 default:
00078 // expanded rendering "DCS:RawDigitDataBlock;225(Far+Data)"
00079 sprintf(newstring[ibuffer],"%3s:%s;%3.3d(%s+%s)"
00080 ,(IsDCS() ? "DCS" : "DAQ")
00081 ,GetMajorAsString(),GetMinor()
00082 ,Detector::AsString(GetDetector())
00083 ,SimFlag::AsString(GetSimFlag())
00084 );
00085 break;
00086 }
00087
00088 return newstring[ibuffer];
00089 }
|
|
||||||||||||
|
Definition at line 120 of file RawBlockId.cxx. References AsString(), and option. Referenced by Print(). 00122 {
00123 if (os.good()) {
00124 if (os.tie()) os.tie()->flush(); // instead of opfx
00125 os << AsString(option);
00126 }
00127 // instead of os.osfx()
00128 if (os.flags() & std::ios::unitbuf) os.flush();
00129 return os;
00130 }
|
|
|
|
Definition at line 111 of file RawBlockId.h. Referenced by RawTofConverter::ConstructTofBlocks(), RerootToRawDataModule::FinalizeWorkingArray(), RawDataBlock::FormatToOStream(), RecordSetupModule::Get(), DigitListModule::Get(), and RawTpSinglesSummaryBlock::RawTpSinglesSummaryBlock(). 00112 { return fEncoded; }
|
|
|
Definition at line 114 of file RawBlockId.h. References fEncoded. Referenced by FarPlaneCheckout::Ana(), AsString(), RotoObjectifier::BufferInflate(), GetMajorAsString(), Cutter::OverShootCutter(), RawRecord::PromoteRawDataBlocks(), and AlgCalDetSI::SetDataPointers(). 00115 { return (fEncoded & maskRawBlkIdMajor) >> shiftRawBlkIdMajor; }
|
|
|
Definition at line 92 of file RawBlockId.cxx. References GetMajor(), RawBlockProxy::GetName(), RawBlockRegistry::Instance(), IsDCS(), and RawBlockRegistry::LookUp(). Referenced by AsString(). 00093 {
00094 // Return major id # expanded as a string
00095
00096 RawBlockRegistry& rbr = RawBlockRegistry::Instance();
00097 RawBlockProxy* rbp = rbr.LookUp(IsDCS(),GetMajor());
00098
00099 static char unknownstring[128];
00100
00101 if (rbp) {
00102 return rbp->GetName();
00103 }
00104 else {
00105 sprintf(unknownstring,"Unknown%3sBlock0x%2.2x",
00106 (IsDCS() ? "DCS" : "DAQ"),GetMajor());
00107 return unknownstring;
00108 }
00109
00110 }
|
|
|
|
|
Definition at line 120 of file RawBlockId.h. References fEncoded. Referenced by FarPlaneCheckout::Ana(), AsString(), RotoObjectifier::BufferInflate(), GetMajorAsString(), and RawRecord::PromoteRawDataBlocks(). 00121 {
00122 return (fEncoded & maskRawBlkIdIsDCS) >> shiftRawBlkIdIsDCS;
00123 }
|
|
|
Definition at line 113 of file RawBlockId.cxx. References FormatToOStream(), and option. 00114 {
00115 // Print the (decoded) value
00116 FormatToOStream(cout,option);
00117 }
|
|
||||||||||||
|
Definition at line 104 of file RawBlockId.h.
|
|
||||||||||||
|
Definition at line 101 of file RawBlockId.h.
|
|
|
Definition at line 57 of file RawBlockId.h. Referenced by GetDetector(), GetMajor(), GetMinor(), GetSimFlag(), IsDCS(), operator!=(), operator==(), and RawBlockId(). |
1.3.9.1