+ TMap* m = static_cast<TMap*>(entry->GetObject()); // old GRP entry
+
+ if (m) {
+ AliDebug(AliQAv1::GetQADebugLevel(), "It is a map");
+ //m->Print();
+ grpObject = new AliGRPObject();
+ grpObject->ReadValuesFromMap(m);
+ }
+
+ else {
+ AliDebug(AliQAv1::GetQADebugLevel(), "It is a new GRP object");
+ grpObject = static_cast<AliGRPObject*>(entry->GetObject()); // new GRP entry
+ }
+
+ entry->SetOwner(0);
+ AliCDBManager::Instance()->UnloadFromCache("GRP/GRP/Data");
+ }
+
+ if (!grpObject) {
+ AliFatal("No GRP entry found in OCDB!");
+ }
+
+ TString lhcState = grpObject->GetLHCState();
+ if (lhcState==AliGRPObject::GetInvalidString()) {
+ AliError("GRP/GRP/Data entry: missing value for the LHC state ! Using UNKNOWN");
+ lhcState = "UNKNOWN";
+ }
+
+ TString beamType = grpObject->GetBeamType();
+ if (beamType==AliGRPObject::GetInvalidString()) {
+ AliError("GRP/GRP/Data entry: missing value for the beam type ! Using UNKNOWN");
+ beamType = "UNKNOWN";
+ }
+
+ Float_t beamEnergy = grpObject->GetBeamEnergy();
+ if (beamEnergy==AliGRPObject::GetInvalidFloat()) {
+ AliError("GRP/GRP/Data entry: missing value for the beam energy ! Using 0");
+ beamEnergy = 0;
+ }
+
+ TString runType = grpObject->GetRunType();
+ if (runType==AliGRPObject::GetInvalidString()) {
+ AliError("GRP/GRP/Data entry: missing value for the run type ! Using UNKNOWN");
+ runType = "UNKNOWN";
+ }
+
+ Int_t activeDetectors = grpObject->GetDetectorMask();
+ if (activeDetectors==AliGRPObject::GetInvalidInt()) {
+ AliError("GRP/GRP/Data entry: missing value for the detector mask ! Using 1074790399");
+ activeDetectors = 1074790399;
+ }
+
+ fRunInfo = new AliRunInfo(lhcState, beamType, beamEnergy, runType, activeDetectors);
+
+ fRunInfoOwner = kTRUE ;
+
+ // set the event specie
+ fEventSpecie = AliRecoParam::kDefault ;
+ if (strcmp(runType,"PHYSICS")) {
+ // Not a physics run, the event specie is set to kCalib
+ fEventSpecie = AliRecoParam::kCalib ;
+ return;
+ }
+ if (strcmp(lhcState,"STABLE_BEAMS") == 0) {
+ // Heavy ion run (any beam tha is not pp, the event specie is set to kHighMult
+ fEventSpecie = AliRecoParam::kHighMult ;
+ if ((strcmp(beamType,"p-p") == 0) ||
+ (strcmp(beamType,"p-") == 0) ||
+ (strcmp(beamType,"-p") == 0) ||
+ (strcmp(beamType,"P-P") == 0) ||
+ (strcmp(beamType,"P-") == 0) ||
+ (strcmp(beamType,"-P") == 0)) {
+ // Proton run, the event specie is set to kLowMult
+ fEventSpecie = AliRecoParam::kLowMult ;
+ }
+ else if (strcmp(beamType,"-") == 0) {
+ // No beams, we assume cosmic data
+ fEventSpecie = AliRecoParam::kCosmic ;
+ }
+ else if (strcmp(beamType,"UNKNOWN") == 0) {
+ // No LHC beam information is available, we use the default event specie
+ fEventSpecie = AliRecoParam::kDefault ;
+ }
+ }
+}
+
+//_____________________________________________________________________________
+Bool_t AliQAChecker::Run(const char * fileName, AliDetectorRecoParam * recoParam)
+{
+ // run the Quality Assurance Checker for all tasks Hits, SDigits, Digits, DigitsR, RecPoints, TrackSegments, RecParticles and ESDs
+ // starting from data in file