File indexing completed on 2025-08-03 08:20:22
0001 #ifndef __GET_RUNSTR__
0002 #define __GET_RUNSTR__
0003
0004
0005
0006 TString get_runstr(const char *fname)
0007 {
0008 TString name = fname;
0009 name.ReplaceAll(".prdf","");
0010 name.ReplaceAll(".root","");
0011 int index = name.Last('/');
0012 if ( index > 0 )
0013 {
0014 name.Remove(0,index+1);
0015 }
0016 index = name.First('-');
0017 if ( index > 0 )
0018 {
0019 name.Remove(0,index+1);
0020 }
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 return name;
0033
0034 }
0035
0036 int get_runnumber(const char *fname)
0037 {
0038 TString str = get_runstr(fname);
0039 cout << str << endl;
0040 int index = str.Last('-');
0041 if ( index > 0 )
0042 {
0043 str.Remove(index,str.Length());
0044 }
0045 cout << " get_runnumber " << str << "\t" << str.Atoi() << endl;
0046 return str.Atoi();
0047 }
0048
0049
0050
0051 namespace MBDRUNS {
0052 enum type {
0053 AUAU200 = 0,
0054 PP200,
0055 SIMAUAU200,
0056 SIMPP200
0057 };
0058 }
0059
0060 #endif
0061