AliRunLoader::~AliRunLoader()
{
//dtor
- if (fgRunLoader == this) fgRunLoader = 0x0;
+
UnloadHeader();
UnloadgAlice();
-
+ if (fgRunLoader == this) fgRunLoader = 0x0;
if(fLoaders) {
fLoaders->SetOwner();
delete fLoaders;
Int_t AliRunLoader::LoadTrigger(Option_t* option)
{
//Load treeCT
-
+ static Bool_t warned = kFALSE;
if( TreeCT() ) {
- AliWarning("Trigger is already loaded. Nothing done");
+ if (!warned) AliWarning("Trigger is already loaded. Nothing done. Message will not be repeated.");
+ warned = kTRUE;
return 0;
}
//run loader object
char loadername[256];
- sprintf(loadername, "%sLoader", detname);
+ snprintf(loadername, 255, "%sLoader", detname);
AliLoader* loader = GetLoader(loadername);
if (!loader) {
AliError(Form("No loader for %s found", detname));
char buff[10];
char dets [200];
- strcpy(dets,namelist);//compiler cries when char* = const Option_t*;
- dets[strlen(dets)+1] = '\n';//set endl at the end of string
+ strncpy(dets,namelist,199);//compiler cries when char* = const Option_t*;
+ // dets[strlen(dets)+1] = '\n';//set endl at the end of string
char* pdet = dets;
Int_t tmp;
for(;;)
{
- tmp = sscanf(pdet,"%s",buff);//read the string from the input string pdet into buff
+ tmp = sscanf(pdet,"%9s",buff);//read the string from the input string pdet into buff
if ( (buff[0] == 0) || (tmp == 0) ) break; //if not read
pdet = strstr(pdet,buff) + strlen(buff);//move the input pointer about number of bytes (letters) read