if ( argument.CompareTo( "-solenoidBz" ) == 0 ) {
if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
- fSolenoidBz = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof();
- HLTInfo( "Magnetic Field set to: %f", fSolenoidBz );
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
continue;
}
//* read magnetic field
- int iResult2 = ReadCDBEntry( kAliHLTCDBSolenoidBz, chainId );
+ int iResult2 = true; //ReadCDBEntry( kAliHLTCDBSolenoidBz, chainId );
+ fSolenoidBz = GetBz();
//* read the actual CDB entry if required
fProduceHistos = 1;
fAutoCalibration = 1000;
+ // Check field
+ if (!TGeoGlobalMagField::Instance()) {
+ HLTError("magnetic field not initialized, please set up TGeoGlobalMagField and AliMagF");
+ return -ENODEV;
+ }
+ fSolenoidBz=GetBz();
+
if(AliGeomManager::GetGeometry()==NULL){
AliGeomManager::LoadGeometry("");
}
if ( argument.CompareTo( "-solenoidBz" ) == 0 ) {
if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
- fSolenoidBz = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof();
- HLTInfo( "Magnetic Field set to: %f", fSolenoidBz );
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
continue;
}
//* read magnetic field
- int iResult2 = ReadCDBEntry( kAliHLTCDBSolenoidBz, chainId );
+ int iResult2 = true; //ReadCDBEntry( kAliHLTCDBSolenoidBz, chainId );
+ fSolenoidBz = GetBz();
//* read the actual CDB entry if required
{
// Configure the ITS tracker component
- if ( fTracker ) return EINPROGRESS;
+ if ( fTracker ) return -EINPROGRESS;
if(AliGeomManager::GetGeometry()==NULL){
AliGeomManager::LoadGeometry();
int ret = Configure( NULL, NULL, arguments.Data() );
- // set field
- if (!TGeoGlobalMagField::Instance()->IsLocked()) {
- AliMagF* field = new AliMagF("Maps","Maps",1.,1.,AliMagF::k5kG);
- field->SetFactorSol(1);
- Double_t initialFieldStrengh=field->SolenoidField();
- field->SetFactorSol(fSolenoidBz/initialFieldStrengh);
- TGeoGlobalMagField::Instance()->SetField(field);
+ // Check field
+ if (!TGeoGlobalMagField::Instance()) {
+ HLTError("magnetic field not initialized, please set up TGeoGlobalMagField and AliMagF");
+ return -ENODEV;
}
+ fSolenoidBz=GetBz();
+
fTracker = new AliITStrackerHLT(0);
return ret;
#include "AliCDBEntry.h"
#include "AliCDBManager.h"
#include "AliCDBStorage.h"
+#include "TGeoGlobalMagField.h"
#include <sys/time.h>
return -ENOENT;
}
+ // Check field
+ if (!TGeoGlobalMagField::Instance()) {
+ HLTError("magnetic field not initialized, please set up TGeoGlobalMagField and AliMagF");
+ return -ENODEV;
+ }
+
fClusterFinder = new AliHLTTPCClusterFinder();
// first configure the default
iResult=ConfigureFromArgumentString(argc, argv);
// return iResult;
- if(iResult>=0){
- //initialize the magnetic field from CDB
- iResult = ConfigureFromCDBTObjString(kAliHLTCDBSolenoidBz);
- }
-
/*
Int_t iResult=0;
TString configuration="";
if (argument.CompareTo("-solenoidBz")==0){
if (++i>=argc) return -EPROTO;
- argument=argv[i];
- AliTPCcalibDB* calib=AliTPCcalibDB::Instance();
- if(!calib){
- HLTError("CalibDB not availible");
- }
- Float_t magneticField = argument.Atof();
- calib->SetExBField(magneticField);
- HLTInfo("SolenoidBz is set to %f in the calibDB",magneticField);
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
return 2;
}
+ AliTPCcalibDB* calib=AliTPCcalibDB::Instance();
+ if(!calib){
+ HLTError("CalibDB not availible");
+ } else {
+ calib->SetExBField(GetBz());
+ HLTInfo("SolenoidBz is set to %f in the calibDB", GetBz());
+ }
+
if (argument.CompareTo("-update-calibdb")==0 || argument.CompareTo("-update-transform")==0 ){
if(fClusterFinder->UpdateCalibDB()){
HLTDebug("CalibDB and offline transform successfully updated.");
#include "AliHLTExternalTrackParam.h"
#include "AliHLTGlobalBarrelTrack.h"
#include "AliHLTTrackMCLabel.h"
+#include "TGeoGlobalMagField.h"
#include <vector>
if (fESD) {
AliESDEvent* pESD=fESD;
+ pESD->Reset();
+ pESD->SetMagneticField(GetBz());
iResult=fBase->ProcessBlocks(pTree, pESD, blocks, (int)evtData.fBlockCnt);
} else {
int iAddedDataBlocks=0;
if (pESD && blocks) {
- pESD->Reset();
- pESD->SetMagneticField(fSolenoidBz);
const AliHLTComponentBlockData* iter = NULL;
int bIsTrackSegs=0;
int iResult=0;
if (!arguments) return iResult;
+ // Check field
+ if (!TGeoGlobalMagField::Instance()) {
+ HLTError("magnetic field not initialized, please set up TGeoGlobalMagField and AliMagF");
+ return -ENODEV;
+ }
+
TString allArgs=arguments;
TString argument;
int bMissingParam=0;
if (argument.CompareTo("-solenoidBz")==0) {
if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
- HLTInfo("Magnetic Field set to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
- fSolenoidBz=((TObjString*)pTokens->At(i))->GetString().Atof();
+ HLTWarning("parameter -solenoidBz deprecated, magnetic field handled by global AliMagF object and TGeoGlobalMagField");
continue;
} else {
HLTError("unknown argument %s", argument.Data());
{
// see header file for class documentation
int iResult=0;
- const char* path=kAliHLTCDBSolenoidBz;
+ const char* path=NULL;
const char* defaultNotify="";
if (cdbEntry) {
path=cdbEntry;
// -solenoidBz
} else if (argument.CompareTo("-solenoidBz")==0) {
- TString tmp="-solenoidBz ";
- tmp+=argv[++i];
- fBase->Configure(tmp.Data());
+ HLTWarning("parameter -solenoidBz deprecated, magnetic field handled by global AliMagF object and TGeoGlobalMagField");
} else {
HLTError("unknown argument %s", argument.Data());
break;
pTree->SetDirectory(0);
}
+ pESD->Reset();
+ pESD->SetMagneticField(GetBz());
if ((iResult=fBase->ProcessBlocks(pTree, pESD, blocks, (int)evtData.fBlockCnt))>0) {
// TODO: set the specification correctly
if (pTree) {
#include "AliCDBEntry.h"
#include "AliCDBManager.h"
#include "AliCDBStorage.h"
+#include "TGeoGlobalMagField.h"
//#include "AliHLTTPC.h"
//#include <stdlib.h>
//#include <cerrno>
int iResult=0;
if (!arguments) return iResult;
+ // Check field
+ if (!TGeoGlobalMagField::Instance()) {
+ HLTError("magnetic field not initialized, please set up TGeoGlobalMagField and AliMagF");
+ return -ENODEV;
+ }
+
TString allArgs=arguments;
TString argument;
int bMissingParam=0;
}
else if (argument.CompareTo("-solenoidBz")==0) {
if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
- fBField=((TObjString*)pTokens->At(i))->GetString().Atof();
- fBField=fBField/10.0;
- HLTInfo("Magnetic field set to: %.1f", fBField);
+ HLTWarning("parameter -solenoidBz deprecated, magnetic field handled by global AliMagF object and TGeoGlobalMagField");
continue;
}
else if (argument.CompareTo("-bfield")==0) {
if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
- fBField=((TObjString*)pTokens->At(i))->GetString().Atof();
- HLTWarning("'-bfield' is deprecated, use -solenoidBz %.1f. Please note the different convention.", 10*fBField);
- HLTInfo("Magnetic field set to: %.1f", fBField);
+ HLTWarning("parameter -bfield deprecated, magnetic field handled by global AliMagF object and TGeoGlobalMagField");
continue;
}
else if (argument.CompareTo("-etarange")==0) {
HLTError("missing parameter for argument %s", argument.Data());
iResult=-EINVAL;
}
+ fBField=GetBz()/10.0;
if (fBField == 0.){
// parameter for B=0 T
fDoPP = kTRUE;
TString str(modules);
if(str.Contains("HLT") || str.Contains("TPC") || str.Contains("GRP")){
- const char* pathBField=kAliHLTCDBSolenoidBz;
+ const char* pathBField=NULL;
if (pathBField) {
HLTInfo("reconfigure B-Field from entry %s, modules %s", pathBField,(modules!=NULL && modules[0]!=0)?modules:"<none>");
}
}
- const char* pathBField=kAliHLTCDBSolenoidBz;
+ const char* pathBField=NULL;
if (pathBField) {
HLTInfo("reconfigure B-Field from entry %s, chain id %s", path,(chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
argument = ( ( TObjString* )pTokens->At( i ) )->GetString();
if ( argument.IsNull() ) continue;
- //if ( argument.CompareTo( "-solenoidBz" ) == 0 ) {
- //if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
- //fSolenoidBz = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof();
- //HLTInfo( "Magnetic Field set to: %f", fSolenoidBz );
- //continue;
- //}
-
HLTError( "Unknown option \"%s\"", argument.Data() );
iResult = -EINVAL;
}
if ( argument.CompareTo( "-solenoidBz" ) == 0 ) {
if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
- fSolenoidBz = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof();
- HLTInfo( "Magnetic Field set to: %f", fSolenoidBz );
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
continue;
}
//* read magnetic field
- int iResult2 = ReadCDBEntry( kAliHLTCDBSolenoidBz, chainId );
+ int iResult2 = true;//ReadCDBEntry( kAliHLTCDBSolenoidBz, chainId );
+ fSolenoidBz=GetBz();
//* read the actual CDB entry if required
if (argument.IsNull()) continue;
if (argument.CompareTo("-solenoidBz")==0) {
-#ifndef HAVE_NOT_ALIMAGF30848
- if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
- // TODO: Matthias 2009-05-08 this changes below look weird to me
- // maybe this was not correctly done by Federico in r 30849
- float SolenoidBz=((TObjString*)pTokens->At(i))->GetString().Atof();
- if (SolenoidBz<kAlmost0Field) SolenoidBz=kAlmost0Field;
- AliMagF::BMap_t map = AliMagF::k5kG;
- float factor=SolenoidBz/5;
- if (SolenoidBz<3.) {
- map=AliMagF::k2kG;
- factor=SolenoidBz/2;
- } /*else if (SolenoidBz>=3. && SolenoidBz<4.5) {
- map=AliMagFMaps::k4kG;
- factor=SolenoidBz/4;
- }
- else {
- map=AliMagFMaps::k5kG;
- factor=SolenoidBz/5;
- } */
- //
- // the magnetic field map is not supposed to change
- // field initialization should be done once in the beginning
- // TODO: does the factor need adjustment?
- const AliMagF* currentMap = (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
- if (!currentMap) {
- AliMagF* field = new AliMagF("MagneticFieldMap", "BMap", 1., 1., map);
- TGeoGlobalMagField::Instance()->SetField(field);
- HLTInfo("Solenoid Field set to: %f map %d", SolenoidBz, map);
- } else if (currentMap->GetMapType()!=map) {
- HLTWarning("omitting request to override field map %d with %d", currentMap->GetMapType(), map);
- }
-#else // keeping the <30489 code for backward compatibility, to be merged at some point
- if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
- // TODO: check if there is common functionality in the AliMagF* classes
- float SolenoidBz=((TObjString*)pTokens->At(i))->GetString().Atof();
- if (SolenoidBz<kAlmost0Field) SolenoidBz=kAlmost0Field;
- float factor=1.;
- int map=AliMagFMaps::k2kG;
- if (SolenoidBz<3.) {
- map=AliMagFMaps::k2kG;
- factor=SolenoidBz/2;
- } else if (SolenoidBz>=3. && SolenoidBz<4.5) {
- map=AliMagFMaps::k4kG;
- factor=SolenoidBz/4;
- } else {
- map=AliMagFMaps::k5kG;
- factor=SolenoidBz/5;
- }
- // the magnetic field map is not supposed to change
- // field initialization should be done once in the beginning
- // TODO: does the factor need adjustment?
- const AliMagF* currentMap=AliTracker::GetFieldMap();
- if (!currentMap) {
- AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., map);
- AliTracker::SetFieldMap(field,kFALSE);
- HLTInfo("Solenoid Field set to: %f map %d", SolenoidBz, map);
- } else if (currentMap->Map()!=map) {
- HLTWarning("omitting request to override field map %s with %s", currentMap->Map(), map);
- }
-#endif
+ if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
continue;
} else {
HLTError("unknown argument %s", argument.Data());
if (argument.IsNull()) continue;
if (argument.CompareTo("-solenoidBz")==0) {
-#ifndef HAVE_NOT_ALIMAGF30848
- if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
- // TODO: Matthias 2009-05-08 this changes below look weird to me
- // maybe this was not correctly done by Federico in r 30849
- float SolenoidBz=((TObjString*)pTokens->At(i))->GetString().Atof();
- if (SolenoidBz<kAlmost0Field) SolenoidBz=kAlmost0Field;
- float factor=SolenoidBz/5;
- //
- AliMagF::BMap_t map = AliMagF::k5kG;
- if (SolenoidBz<3.) {
- map=AliMagF::k2kG;
- factor=SolenoidBz/2;
- } /*else if (SolenoidBz>=3. && SolenoidBz<4.5) {
- map=AliMagFMaps::k4kG;
- factor=SolenoidBz/4;
- }
- else {
- map=AliMagFMaps::k5kG;
- factor=SolenoidBz/5;
- } */
- // the magnetic field map is not supposed to change
- // field initialization should be done once in the beginning
- // TODO: does the factor need adjustment?
- const AliMagF* currentMap = (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
- if (!currentMap) {
- AliMagF* field = new AliMagF("MagneticFieldMap", "BMap", 1., 1., map);
- TGeoGlobalMagField::Instance()->SetField(field);
- HLTInfo("Solenoid Field set to: %f map %d", SolenoidBz, map);
- } else if (currentMap->GetMapType()!=map) {
- HLTWarning("omitting request to override field map %d with %d", currentMap->GetMapType(), map);
- }
-#else // keeping the <30489 code for backward compatibility, to be merged at some point
- if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
- // TODO: check if there is common functionality in the AliMagF* classes
- float SolenoidBz=((TObjString*)pTokens->At(i))->GetString().Atof();
- if (SolenoidBz<kAlmost0Field) SolenoidBz=kAlmost0Field;
- float factor=1.;
- int map=AliMagFMaps::k2kG;
- if (SolenoidBz<3.) {
- map=AliMagFMaps::k2kG;
- factor=SolenoidBz/2;
- } else if (SolenoidBz>=3. && SolenoidBz<4.5) {
- map=AliMagFMaps::k4kG;
- factor=SolenoidBz/4;
- } else {
- map=AliMagFMaps::k5kG;
- factor=SolenoidBz/5;
- }
- // the magnetic field map is not supposed to change
- // field initialization should be done once in the beginning
- // TODO: does the factor need adjustment?
- const AliMagF* currentMap=AliTracker::GetFieldMap();
- if (!currentMap) {
- AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., map);
- AliTracker::SetFieldMap(field,kFALSE);
- HLTInfo("Solenoid Field set to: %f map %d", SolenoidBz, map);
- } else if (currentMap->Map()!=map) {
- HLTWarning("omitting request to override field map %s with %s", currentMap->Map(), map);
- }
-#endif
+ if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
continue;
} else {
HLTError("unknown argument %s", argument.Data());
if ( argument.CompareTo( "-solenoidBz" ) == 0 ) {
if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
- fSolenoidBz = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof();
- HLTInfo( "Magnetic Field set to: %f", fSolenoidBz );
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
continue;
}
//* read magnetic field
- int iResult2 = ReadCDBEntry( kAliHLTCDBSolenoidBz, chainId );
+ int iResult2 = true;//ReadCDBEntry( kAliHLTCDBSolenoidBz, chainId );
+ fSolenoidBz = GetBz();
//* read the actual CDB entry if required
if ( argument.CompareTo( "-solenoidBz" ) == 0 ) {
if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
- fSolenoidBz = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof();
- HLTInfo( "Magnetic Field set to: %f", fSolenoidBz );
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
continue;
}
//* read magnetic field
- int iResult2 = ReadCDBEntry( kAliHLTCDBSolenoidBz, chainId );
+ int iResult2 = true; //ReadCDBEntry( kAliHLTCDBSolenoidBz, chainId );
+ fSolenoidBz = GetBz();
//* read the actual CDB entry if required
HLTDebug("NofBlocks %i", evtData.fBlockCnt );
fESD->Reset();
- //fESD->SetMagneticField(fSolenoidBz);
+ //fESD->SetMagneticField(GetBz());
AliHLTUInt32_t totalSize = 0, offset = 0;
}
else if (argument.CompareTo("-solenoidBz")==0) {
if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
- fieldStrength=((TObjString*)pTokens->At(i))->GetString().Atof();
- HLTInfo("Setting Magnetic field to %.1f KGauss", fieldStrength);
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
continue;
}
else if (argument.CompareTo("-NTimeBins")==0) {
HLTDebug("Reconstructor options are: %s",recoOptions.Data());
fReconstructor->SetOption(recoOptions.Data());
- if (fMagneticField >= 0)
- {
- HLTWarning("Setting magnetic field by hand!");
- }
- if (!TGeoGlobalMagField::Instance()->IsLocked()) {
- AliMagF* field;
- if (fMagneticField == 0){
- // magnetic field OFF
- field = new AliMagF("Maps","Maps",0.,0.,AliMagF::k5kGUniform);
- TGeoGlobalMagField::Instance()->SetField(field);
- HLTDebug("Magnetic field is OFF.");
- }else{
- // magnetic field ON
- field = new AliMagF("Maps","Maps",-1.,-1.,AliMagF::k5kG);
- TGeoGlobalMagField::Instance()->SetField(field);
- HLTDebug("Magnetic field is ON.");
- if( fMagneticField < 0 )
- iResult=ReconfigureField();
- }
- }else{
- HLTError("Magnetic field is already set and locked, cannot redefine it." );
- }
- return iResult;
-}
-
-int AliHLTTRDTrackerV1Component::ReconfigureField()
-{
- int iResult=0;
- if(fieldStrength<-100){
- const char* pathBField=kAliHLTCDBSolenoidBz;
-
- if (pathBField) {
- HLTInfo("reconfigure B-Field from entry %s", pathBField);
- AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(pathBField/*,GetRunNo()*/);
- if (pEntry) {
- TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
- if (pString) {
- HLTInfo("received configuration object string: \'%s\'", pString->GetString().Data());
- TObjArray* pTokens=pString->GetString().Tokenize(" ");
- TString argument;
- int bMissingParam=0;
- if (pTokens) {
- for (int i=0; i<pTokens->GetEntries() && iResult>=0; i++) {
- argument=((TObjString*)pTokens->At(i))->GetString();
- if (argument.IsNull()) continue;
-
- if (argument.CompareTo("-solenoidBz")==0) {
- if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
- HLTDebug("Magnetic field in CDB: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
- fieldStrength=((TObjString*)pTokens->At(i))->GetString().Atof();
- continue;
- } else {
- HLTError("unknown argument %s", argument.Data());
- iResult=-EINVAL;
- break;
- }
- }
- delete pTokens;
- }
- } else {
- HLTError("configuration object \"%s\" has wrong type, required TObjString", pathBField);
- }
- } else {
- HLTError("cannot fetch object \"%s\" from CDB", pathBField);
- }
- }
- }
-
- if(fieldStrength>=-100){
- AliMagF* field = (AliMagF *) TGeoGlobalMagField::Instance()->GetField();
- HLTDebug("Magnetic field before change: %f KGauss", field->SolenoidField());
- field->SetFactorSol(1);
- Double_t initialFieldStrengh=field->SolenoidField();
- field->SetFactorSol(fieldStrength/initialFieldStrengh);
- field->SetFactorDip((fieldStrength/initialFieldStrengh>=0) ? 1 : -1);
- HLTDebug("Magnetic field was changed to %f KGauss.", field->SolenoidField());
- }
return iResult;
}
}
}
- const char* pathBField=kAliHLTCDBSolenoidBz;
-
- if (pathBField) {
- HLTInfo("reconfigure B-Field from entry %s, chain id %s", pathBField,(chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
- AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(pathBField/*,GetRunNo()*/);
- if (pEntry) {
- TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
- if (pString) {
- HLTInfo("received configuration object string: \'%s\'", pString->GetString().Data());
- iResult=Configure(pString->GetString().Data());
- } else {
- HLTError("configuration object \"%s\" has wrong type, required TObjString", pathBField);
- }
- } else {
- HLTError("cannot fetch object \"%s\" from CDB", pathBField);
- }
- }
-
return iResult;
}
TString str(modules);
if(str.Contains("HLT") || str.Contains("TRD") || str.Contains("GRP")){
- const char* pathBField=kAliHLTCDBSolenoidBz;
- if (pathBField) {
-
- HLTInfo("reconfigure B-Field from entry %s, modules %s", pathBField,(modules!=NULL && modules[0]!=0)?modules:"<none>");
- AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(pathBField/*,GetRunNo()*/);
-
- // AliCDBPath path(pathBField);
-
- // AliCDBStorage *stor = AliCDBManager::Instance()->GetDefaultStorage();
- // Int_t version = stor->GetLatestVersion(pathBField, GetRunNo());
- // Int_t subVersion = stor->GetLatestSubVersion(pathBField, GetRunNo(), version);
- // AliCDBEntry *pEntry = stor->Get(path,GetRunNo(), version, subVersion);
-
- // HLTInfo("RunNo %d, Version %d, subversion %d", GetRunNo(), version, subVersion);
-
- if (pEntry) {
- TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
- if (pString) {
- HLTInfo("received configuration object string: \'%s\'", pString->GetString().Data());
- iResult=Configure(pString->GetString().Data());
- } else {
- HLTError("configuration object \"%s\" has wrong type, required TObjString", pathBField);
- }
- } else {
- HLTError("cannot fetch object \"%s\" from CDB", pathBField);
- }
- }
}
return iResult;
}
int Configure(const char* arguments);
int SetParams();
- int ReconfigureField();
private:
/** copy constructor prohibited */
if (argument.CompareTo("-solenoidBz")==0) {
if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
- HLTInfo("Magnetic Field set to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
- fSolenoidBz=((TObjString*)pTokens->At(i))->GetString().Atof();
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
continue;
} else {
HLTError("unknown argument %s", argument.Data());
{
// see header file for class documentation
int iResult=0;
- const char* path=kAliHLTCDBSolenoidBz;
+ const char* path=NULL;
const char* defaultNotify="";
if (cdbEntry) {
path=cdbEntry;
iResult=-EINVAL;
}
+ fSolenoidBz=GetBz();
+
if (iResult>=0) {
fESD = new AliESDEvent;
if (fESD) {
HLTError("decision parameter not initialized");
iResult=-ENODEV;
}
+ fSolenoidBz=GetBz();
return iResult;
}
{
// see header file for function documentation
- // TODO 2009-10-10: implementation
- // for the moment very quick, just reload the magnetic field
- return ConfigureFromCDBTObjString(kAliHLTCDBSolenoidBz);
+ // nothing to do for the moment
+ return 0;
}
int AliHLTTriggerBarrelGeomMultiplicity::GetDetectorGeomsFromCDBObject(const char *cdbEntry, const char* chainId)
// first configure the default
int iResult=0;
- iResult=ConfigureFromCDBTObjString(kAliHLTCDBSolenoidBz);
- if (iResult>=0) iResult=ConfigureFromCDBTObjString(fgkOCDBEntry);
+ iResult=ConfigureFromCDBTObjString(fgkOCDBEntry);
// configure from the command line parameters if specified
if (iResult>=0 && argc>0)
iResult=ConfigureFromArgumentString(argc, argv);
return iResult;
+
+ fSolenoidBz=GetBz();
}
int AliHLTTriggerBarrelMultiplicity::DoDeinit()
// configure from the specified antry or the default one
const char* entry=cdbEntry;
if (!entry || entry[0]==0) {
- ConfigureFromCDBTObjString(kAliHLTCDBSolenoidBz);
entry=fgkOCDBEntry;
}
{
// see header file for class documentation
- // TODO 2009-09-10: implementation
- // for the moment very quick, just reload the magnetic field
- return ConfigureFromCDBTObjString(kAliHLTCDBSolenoidBz);
+ // nothing to do for the moment
+ return 0;
}
int AliHLTTriggerBarrelMultiplicity::ScanConfigurationArgument(int argc, const char** argv)
// -solenoidBz
if (argument.CompareTo("-solenoidBz")==0) {
if (++i>=argc) return -EPROTO;
- argument=argv[i];
- fSolenoidBz=argument.Atof();
+ HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
return 2;
}