]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCDigitReader.cxx
Fixing problems with AliHLTGlobalTriggerComponent and failing test: testGlobalTrigger...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReader.cxx
index 667b3e23a21eabc5c0f0ab505e009d71d13f29a5..de3ef49930975f976220f975e180195e07bfe67b 100644 (file)
     @brief  An abstract reader class for TPC data.
 */
 
+// see header file for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
 #if __GNUC__>= 3
 using namespace std;
 #endif
@@ -34,13 +40,27 @@ using namespace std;
 
 ClassImp(AliHLTTPCDigitReader)
 
-AliHLTTPCDigitReader::AliHLTTPCDigitReader(){
+AliHLTTPCDigitReader::AliHLTTPCDigitReader()
+  :
+  fFlags(0),
+  fLckRow(-1),
+  fLckPad(-1)
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
 }
 
-AliHLTTPCDigitReader::~AliHLTTPCDigitReader(){
+AliHLTTPCDigitReader::~AliHLTTPCDigitReader()
+{
+  // see header file for class documentation
 }
 
-int AliHLTTPCDigitReader::InitBlock(void* ptr,unsigned long size,Int_t firstrow,Int_t lastrow, Int_t patch, Int_t slice){
+int AliHLTTPCDigitReader::InitBlock(void* ptr,unsigned long size,Int_t firstrow,Int_t lastrow, Int_t patch, Int_t slice)
+{
+  // see header file for class documentation
   if (patch<0 || patch>=AliHLTTPCTransform::GetNumberOfPatches()) {
     HLTError("invalid readout partition number %d", patch);
     return -EINVAL;
@@ -58,4 +78,168 @@ int AliHLTTPCDigitReader::InitBlock(void* ptr,unsigned long size,Int_t firstrow,
 
 void AliHLTTPCDigitReader::SetOldRCUFormat(Bool_t /*oldrcuformat*/)
 {
+  // default method of the base class
+}
+
+void AliHLTTPCDigitReader::SetUnsorted(Bool_t /*unsorted*/)
+{
+  // default method of the base class
+  HLTWarning("common sorting functionality has not yet been implemented");
+}
+
+bool AliHLTTPCDigitReader::Next(int /*type*/)
+{
+  // see header file for class documentation
+  if (!CheckFlag(kLocked)) return NextSignal();
+
+  bool haveData=false;
+  if (!CheckFlag(kChannelOverwrap))
+    haveData=NextSignal();
+
+  if (haveData && (fLckRow!=GetRow() || fLckPad!=GetPad())) {
+    SetFlag(kChannelOverwrap);
+    haveData=false;
+  }
+
+  return haveData;
+}
+
+bool AliHLTTPCDigitReader::NextChannel()
+{
+  // see header file for class documentation
+  PrintWarningOnce(kWarnMissFastAccess,"\n"
+                  "      !!! This digit reader does not implement the methods for       !!!\n"
+                  "      !!! fast data access on channel/bunch basis. Data is discarded !!!");
+  return false;
 }
+
+int AliHLTTPCDigitReader::NextBunch()
+{
+  // see header file for class documentation
+  PrintWarningOnce(kWarnMissFastAccess,"\n"
+                  "      !!! This digit reader does not implement the methods for       !!!\n"
+                  "      !!! fast data access on channel/bunch basis. Data is discarded !!!");
+  return false;
+}
+
+const UInt_t* AliHLTTPCDigitReader::GetSignals()
+{
+  // see header file for class documentation
+  PrintWarningOnce(kWarnMissFastAccess,"\n"
+                  "      !!! This digit reader does not implement the methods for       !!!\n"
+                  "      !!! fast data access on channel/bunch basis. Data is discarded !!!");
+  return 0;
+}
+
+const UShort_t* AliHLTTPCDigitReader::GetSignalsShort()
+{
+  // see header file for class documentation
+  PrintWarningOnce(kWarnMissFastAccess,"\n"
+                  "      !!! This digit reader does not implement the methods for       !!!\n"
+                  "      !!! fast data access on channel/bunch basis. Data is discarded !!!");
+  return 0;
+}
+
+void AliHLTTPCDigitReader::EnableCaching(bool bCache)
+{
+  // see header file for class documentation
+  if (bCache) SetFlag(kChannelCaching);
+  else ClearFlag(kChannelCaching);
+}
+
+int AliHLTTPCDigitReader::RewindChannel()
+{
+  // see header file for class documentation
+  int iResult=0;
+  
+  return iResult;
+}
+
+unsigned int AliHLTTPCDigitReader::SetFlag(unsigned int flag)
+{
+  // see header file for class documentation
+  return fFlags|=flag;
+}
+       
+unsigned int AliHLTTPCDigitReader::ClearFlag(unsigned int flag)
+{
+  // see header file for class documentation
+  return fFlags&=~flag;
+}
+
+// int operator[](int timebin)
+// {
+//   return -1;
+// }
+
+int AliHLTTPCDigitReader::RewindCurrentChannel()
+{
+  // see header file for class documentation
+  SetFlag(kNoRewind);
+  if (!CheckFlag(kChannelCaching)) return -ENODATA;
+  return -ENOSYS;
+}
+
+int AliHLTTPCDigitReader::RewindToPrevChannel()
+{
+  // see header file for class documentation
+  SetFlag(kNoRewind);
+  if (!CheckFlag(kChannelCaching)) return -ENODATA;
+  return -ENOSYS;
+}
+
+int AliHLTTPCDigitReader::GetBunchSize()
+{
+  // see header file for class documentation
+  PrintWarningOnce(kWarnMissFastAccess,"\n"
+                  "      !!! This digit reader does not implement the methods for       !!!\n"
+                  "      !!! fast data access on channel/bunch basis. Data is discarded !!!");
+  return 0;
+}
+
+int AliHLTTPCDigitReader::GetRowOffset() const
+{
+  // see header file for class documentation
+  return 0;
+}
+
+AliHLTUInt32_t AliHLTTPCDigitReader::GetAltroBlockHWaddr() const
+{
+  // see header file for class documentation
+  return 0;
+}
+
+AliHLTUInt32_t AliHLTTPCDigitReader::GetAltroBlockHWaddr(Int_t /*row*/, Int_t /*pad*/) const
+{
+  // see header file for class documentation
+  return 0;
+}
+
+int AliHLTTPCDigitReader::GetRCUTrailerSize()
+{
+  // see header file for class documentation
+  PrintWarningOnce(kWarnMissTrailerGetters,"\n"
+                  "      !!! This digit reader does not implement the Getters       !!!\n"
+                  "      !!! for RCU trailer. Ignoring call.                        !!!");
+  return 0;
+}
+
+bool AliHLTTPCDigitReader::GetRCUTrailerData(UChar_t*& trData)
+{
+  // see header file for class documentation
+  PrintWarningOnce(kWarnMissTrailerGetters,"\n"
+                  "      !!! This digit reader does not implement the Getters       !!!\n"
+                  "      !!! for RCU trailer. Ignoring call.                        !!!");
+  if (trData) trData=NULL;
+  return 0;
+}
+
+
+void AliHLTTPCDigitReader::PrintWarningOnce(int type, const char* message)
+{
+  // see header file for class documentation
+  if (CheckFlag(type)) return;
+  SetFlag(type);
+  HLTWarning(message);
+}
+