112 mess =
"AbortProcess";
116 Info(mess,
"%s", why);
137 bool fromFile =
false;
138 if (strchr(filename,
'.') !=
nullptr) {
141 localname += filename;
142 gROOT->ProcessLine(localname);
148 const char *basename =
gSystem->BaseName(filename);
150 ::Error(
"TSelector::GetSelector",
"unable to determine the classname for file %s", filename);
154 localname =
gSystem->SplitAclicMode(basename,aclicmode,args,io);
162 bool autoloaderr =
false;
163 if (!fromFile &&
gCling->AutoLoad(localname) != 1)
173 ::Error(
"TSelector::GetSelector",
174 "The class %s in file %s does not derive from TSelector.", localname.
Data(), filename);
175 else if (autoloaderr)
176 ::Error(
"TSelector::GetSelector",
"class %s could not be loaded", filename);
178 ::Error(
"TSelector::GetSelector",
179 "class %s does not exist or does not derive from TSelector", filename);
182 char *result = (
char*)selCl->
New();
188 ClassInfo_t *cl =
gCling->ClassInfo_Factory(localname);
190 bool nameFound =
false;
191 if (cl &&
gCling->ClassInfo_IsValid(cl)) {
192 if (localname ==
gCling->ClassInfo_FullName(cl)) {
194 if (
gCling->ClassInfo_IsBase(cl,
"TSelector")) ok =
true;
200 ::Error(
"TSelector::GetSelector",
201 "The class %s in file %s does not derive from TSelector.", localname.
Data(), filename);
203 ::Error(
"TSelector::GetSelector",
204 "The file %s does not define a class named %s.", filename, localname.
Data());
208 ::Error(
"TSelector::GetSelector",
"class %s could not be loaded", filename);
210 ::Error(
"TSelector::GetSelector",
211 "class %s does not exist or does not derive from TSelector", filename);
213 gCling->ClassInfo_Delete(cl);
219 gCling->ClassInfo_Delete(cl);
232 ::Info(
"TSelector::IsStandardDraw",
233 "selector name undefined - do nothing");
237 bool stdselec =
false;
238 if (!strchr(selec,
'.')) {
239 if (strstr(selec,
"TSelectorDraw")) {
263 if (!output || output->
GetSize() <= 0) {
272 while ((o = nxexo())) {
278 while ((o = nxo())) {
284 output->
Clear(
"nodelete");
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
long long Long64_t
Portable signed long integer 8 bytes.
externTInterpreter * gCling
TClass instances represent classes, structs and namespaces in the ROOT type system.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
Int_t GetBaseClassOffset(const TClass *toBase, void *address=nullptr, bool isDerivedObject=true)
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
void Clear(Option_t *option="") override
Remove all objects from the list.
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
TObject * Remove(TObject *obj) override
Remove object from the list.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TObject()
TObject constructor.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
A TList derived class that makes sure that objects added to it are not linked to the currently open f...
static bool IsStandardDraw(const char *selec)
Find out if this is a standard selection used for Draw actions (either TSelectorDraw or deriving from...
TSelector(const TSelector &)
TList * fInput
List of objects available during processing.
virtual void ProcessFill(Long64_t)
This method is called for all selected entries.
virtual bool ProcessCut(Long64_t)
This method is called before processing entry.
virtual bool Process(Long64_t)
The Process() function is called for each entry in the tree to be processed.
virtual void ImportOutput(TList *output)
Imports the content of 'output' in the internal output list.
TSelectorList * fOutput
! List of objects created during processing
Long64_t fStatus
Selector status.
virtual void Abort(const char *why, EAbort what=kAbortProcess)
Abort processing.
TObject * fObject
! Current object if processing object (vs. TTree)
~TSelector() override
Selector destructor.
EAbort fAbort
Abort status.
TSelector()
Default selector ctor.
static TSelector * GetSelector(const char *filename)
The code in filename is loaded (interpreted or compiled, see below), filename must contain a valid cl...
const char * Data() const
Ssiz_t Last(char c) const
Find last occurrence of a character c.
TString & Remove(Ssiz_t pos)