]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCDigitReader.cxx
Adding small protection
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReader.cxx
index eeb91e3946506be6a0168018c0e788e93001e680..a6e382e8b7e09c014593dda4e654fb00ad83f636 100644 (file)
 // or
 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
 
-#if __GNUC__>= 3
-using namespace std;
-#endif
-
 #include "AliHLTTPCDigitReader.h"
 #include "AliHLTTPCTransform.h"
 #include "AliHLTStdIncludes.h"
 
+using namespace std;
+
 ClassImp(AliHLTTPCDigitReader)
 
 AliHLTTPCDigitReader::AliHLTTPCDigitReader()
@@ -107,21 +105,36 @@ bool AliHLTTPCDigitReader::Next(int /*type*/)
 bool AliHLTTPCDigitReader::NextChannel()
 {
   // see header file for class documentation
-  PrintMissingFastAccessWarning();
+  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
-  PrintMissingFastAccessWarning();
+  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
-  PrintMissingFastAccessWarning();
+  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;
 }
 
@@ -176,7 +189,9 @@ int AliHLTTPCDigitReader::RewindToPrevChannel()
 int AliHLTTPCDigitReader::GetBunchSize()
 {
   // see header file for class documentation
-  PrintMissingFastAccessWarning();
+  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;
 }
 
@@ -188,15 +203,41 @@ int AliHLTTPCDigitReader::GetRowOffset() const
 
 AliHLTUInt32_t AliHLTTPCDigitReader::GetAltroBlockHWaddr() const
 {
+  // see header file for class documentation
   return 0;
 }
 
-void AliHLTTPCDigitReader::PrintMissingFastAccessWarning()
+AliHLTUInt32_t AliHLTTPCDigitReader::GetAltroBlockHWaddr(Int_t /*row*/, Int_t /*pad*/) const
 {
   // see header file for class documentation
-  if (CheckFlag(kWarnMissFastAccess)) return;
-  SetFlag(kWarnMissFastAccess);
-  HLTWarning("\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::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);
+}
+