File indexing completed on 2026-05-07 08:56:21
0001
0002
0003
0004
0005 #pragma once
0006
0007 #include <JANA/JObject.h>
0008 #include <JANA/JException.h>
0009 #include <JANA/JFactoryT.h>
0010 #include <JANA/JFactorySet.h>
0011 #include <JANA/JLogger.h>
0012 #include <JANA/JVersion.h>
0013
0014 #include <JANA/Components/JLightweightDatabundle.h>
0015 #if JANA2_HAVE_PODIO
0016 #include <JANA/Components/JPodioDatabundle.h>
0017 #endif
0018
0019 #include <JANA/Utils/JEventLevel.h>
0020 #include <JANA/Utils/JTypeInfo.h>
0021 #include <JANA/Utils/JCpuInfo.h>
0022 #include <JANA/Utils/JCallGraphRecorder.h>
0023 #include <JANA/Utils/JCallGraphEntryMaker.h>
0024 #include <JANA/Utils/JInspector.h>
0025
0026 #include <typeindex>
0027 #include <cstdint>
0028 #include <vector>
0029 #include <memory>
0030 #include <atomic>
0031
0032
0033 class JApplication;
0034 class JEventSource;
0035
0036
0037 class JEvent : public std::enable_shared_from_this<JEvent> {
0038
0039 private:
0040 JApplication* mApplication = nullptr;
0041 int32_t mRunNumber = 0;
0042 uint64_t mEventNumber = 0;
0043 mutable JFactorySet mFactorySet;
0044 mutable JCallGraphRecorder mCallGraph;
0045 mutable JInspector mInspector;
0046 mutable std::string mEventStamp;
0047 bool mUseDefaultTags = false;
0048 std::map<std::string, std::string> mDefaultTags;
0049 JEventSource* mEventSource = nullptr;
0050 bool mIsBarrierEvent = false;
0051 bool mIsWarmedUp = false;
0052
0053
0054 std::vector<std::pair<JEventLevel, std::pair<JEvent*, uint64_t>>> mParents;
0055 std::atomic_int mReferenceCount {0};
0056 int64_t mEventIndex = -1;
0057
0058 void MakeEventStamp() const;
0059
0060 public:
0061 JEvent();
0062 explicit JEvent(JApplication* app);
0063 virtual ~JEvent();
0064
0065 void SetRunNumber(int32_t aRunNumber){mRunNumber = aRunNumber; MakeEventStamp(); }
0066 void SetEventNumber(uint64_t aEventNumber){mEventNumber = aEventNumber; MakeEventStamp(); }
0067 void SetJApplication(JApplication* app){mApplication = app;}
0068 void SetJEventSource(JEventSource* aSource){mEventSource = aSource;}
0069 void SetDefaultTags(std::map<std::string, std::string> aDefaultTags){mDefaultTags=aDefaultTags; mUseDefaultTags = !mDefaultTags.empty();}
0070 void SetSequential(bool isSequential) {mIsBarrierEvent = isSequential;}
0071
0072 JFactorySet* GetFactorySet() const { return &mFactorySet; }
0073 int32_t GetRunNumber() const {return mRunNumber;}
0074 uint64_t GetEventNumber() const {return mEventNumber;}
0075 JApplication* GetJApplication() const {return mApplication;}
0076 JEventSource* GetJEventSource() const {return mEventSource; }
0077 JCallGraphRecorder* GetJCallGraphRecorder() const {return &mCallGraph;}
0078 JInspector* GetJInspector() const {return &mInspector;}
0079 void Inspect() const { mInspector.Loop();}
0080 bool GetSequential() const {return mIsBarrierEvent;}
0081 bool IsWarmedUp() { return mIsWarmedUp; }
0082
0083
0084 JEventLevel GetLevel() const { return mFactorySet.GetLevel(); }
0085 void SetLevel(JEventLevel level) { mFactorySet.SetLevel(level); }
0086 void SetEventIndex(int event_index) { mEventIndex = event_index; }
0087 int64_t GetEventIndex() const { return mEventIndex; }
0088 const std::string& GetEventStamp() const;
0089
0090 bool HasParent(JEventLevel level) const;
0091 const JEvent& GetParent(JEventLevel level) const;
0092 void SetParent(JEvent* parent);
0093 JEvent* ReleaseParent(JEventLevel level);
0094 std::vector<JEvent*> ReleaseAllParents();
0095 int GetChildCount();
0096 uint64_t GetParentNumber(JEventLevel level) const;
0097 void SetParentNumber(JEventLevel level, uint64_t number);
0098
0099 void TakeRefToSelf();
0100 int ReleaseRefToSelf();
0101
0102
0103 void Clear(bool processed_successfully=true);
0104 void Finish();
0105
0106 JFactory* GetFactory(const std::string& object_name, const std::string& tag) const;
0107 std::vector<JFactory*> GetAllFactories() const;
0108
0109
0110 template<class T> JFactoryT<T>* GetFactory(const std::string& tag = "", bool throw_on_missing=false) const;
0111 template<class T> JLightweightDatabundleT<T>* GetLightweightDatabundle(const std::string& tag, bool throw_on_missing, bool call_factory_create) const;
0112 template<class T> std::vector<JFactoryT<T>*> GetFactoryAll(bool throw_on_missing = false) const;
0113
0114
0115 template<class T> JFactoryT<T>* GetSingle(const T* &t, const char *tag="", bool exception_if_not_one=true) const;
0116 template<class T> JFactoryT<T>* Get(const T** item, const std::string& tag="") const;
0117 template<class T> JFactoryT<T>* Get(std::vector<const T*> &vec, const std::string& tag = "", bool strict=true) const;
0118 template<class T> void GetAll(std::vector<const T*> &vec) const;
0119
0120
0121 template<class T> const T* GetSingle(const std::string& tag = "") const;
0122 template<class T> const T* GetSingleStrict(const std::string& tag = "") const;
0123 template<class T> std::vector<const T*> Get(const std::string& tag = "", bool strict=true) const;
0124 template<class T> typename JFactoryT<T>::PairType GetIterators(const std::string& aTag = "") const;
0125 template<class T> std::vector<const T*> GetAll() const;
0126 template<class T> std::map<std::pair<std::string,std::string>,std::vector<T*>> GetAllChildren() const;
0127
0128
0129 template <class T> JFactoryT<T>* Insert(T* item, const std::string& aTag = "") const;
0130 template <class T> JFactoryT<T>* Insert(const std::vector<T*>& items, const std::string& tag = "") const;
0131
0132
0133 #if JANA2_HAVE_PODIO
0134 std::vector<std::string> GetAllCollectionNames() const;
0135 const podio::CollectionBase* GetCollectionBase(std::string name, bool throw_on_missing=true) const;
0136 template <typename T> const typename T::collection_type* GetCollection(std::string name, bool throw_on_missing=true) const;
0137 template <typename T> void InsertCollection(typename T::collection_type&& collection, std::string name);
0138 template <typename T> void InsertCollectionAlreadyInFrame(const podio::CollectionBase* collection, std::string name);
0139 #endif
0140
0141
0142 };
0143
0144
0145
0146
0147 template<class T>
0148 inline JFactoryT<T>* JEvent::GetFactory(const std::string& tag, bool throw_on_missing) const
0149 {
0150 std::string resolved_tag = tag;
0151 if (mUseDefaultTags && tag.empty()) {
0152 auto defaultTag = mDefaultTags.find(JTypeInfo::demangle<T>());
0153 if (defaultTag != mDefaultTags.end()) resolved_tag = defaultTag->second;
0154 }
0155 auto* databundle = mFactorySet.GetDatabundle(std::type_index(typeid(T)), resolved_tag);
0156 if (databundle == nullptr) {
0157 if (throw_on_missing) {
0158 JException ex("Could not find databundle with type_index=" + JTypeInfo::demangle<T>() + " and tag=" + tag);
0159 ex.show_stacktrace = false;
0160 mFactorySet.Print();
0161 throw ex;
0162 }
0163 return nullptr;
0164 };
0165 auto* factory = databundle->GetFactory();
0166 if (factory == nullptr) {
0167 if (throw_on_missing) {
0168 JException ex("No factory provided for databundle with type_index=" + JTypeInfo::demangle<T>() + " and tag=" + tag);
0169 ex.show_stacktrace = false;
0170 mFactorySet.Print();
0171 throw ex;
0172 }
0173 return nullptr;
0174 };
0175 auto* typed_factory = dynamic_cast<JFactoryT<T>*>(databundle->GetFactory());
0176 if (typed_factory == nullptr) {
0177 if (throw_on_missing) {
0178 JException ex("Factory does not inherit from JFactoryT<T> for databundle with type_index=" + JTypeInfo::demangle<T>() + " and tag=" + tag);
0179 ex.show_stacktrace = false;
0180 mFactorySet.Print();
0181 throw ex;
0182 }
0183 return nullptr;
0184 };
0185 return typed_factory;
0186 }
0187
0188 template<class T>
0189 JLightweightDatabundleT<T>* JEvent::GetLightweightDatabundle(const std::string& tag, bool throw_on_missing, bool call_factory_create) const {
0190 std::string resolved_tag = tag;
0191 if (mUseDefaultTags && tag.empty()) {
0192 auto defaultTag = mDefaultTags.find(JTypeInfo::demangle<T>());
0193 if (defaultTag != mDefaultTags.end()) resolved_tag = defaultTag->second;
0194 }
0195 auto* databundle = mFactorySet.GetDatabundle(std::type_index(typeid(T)), resolved_tag);
0196 if (databundle == nullptr) {
0197 if (throw_on_missing) {
0198 JException ex("Could not find databundle with type_index=" + JTypeInfo::demangle<T>() + " and tag=" + tag);
0199 ex.show_stacktrace = false;
0200 mFactorySet.Print();
0201 throw ex;
0202 }
0203 return nullptr;
0204 };
0205 auto* typed_databundle = dynamic_cast<JLightweightDatabundleT<T>*>(databundle);
0206 if (typed_databundle == nullptr) {
0207 if (throw_on_missing) {
0208 JException ex("Databundle with shortname '%s' does not inherit from JLightweightDatabundleT<%s>", tag.c_str(), JTypeInfo::demangle<T>().c_str());
0209 ex.show_stacktrace = false;
0210 mFactorySet.Print();
0211 throw ex;
0212 }
0213 return nullptr;
0214 }
0215 auto factory = databundle->GetFactory();
0216 if (call_factory_create && factory != nullptr) {
0217
0218 JCallGraphEntryMaker cg_entry(mCallGraph, factory);
0219 factory->Create(*this);
0220 }
0221 return typed_databundle;
0222 }
0223
0224
0225
0226
0227
0228 template<class T>
0229 inline std::vector<JFactoryT<T>*> JEvent::GetFactoryAll(bool throw_on_missing) const {
0230 std::vector<JFactoryT<T>*> factories;
0231 for (auto* factory : mFactorySet.GetAllFactories()) {
0232 auto typed_factory = dynamic_cast<JFactoryT<T>*>(factory);
0233 if (typed_factory != nullptr) {
0234 factories.push_back(typed_factory);
0235 }
0236 }
0237 if (factories.size() == 0) {
0238 if (throw_on_missing) {
0239 JException ex("Could not find any JFactoryT<" + JTypeInfo::demangle<T>() + "> (from any tag)");
0240 throw ex;
0241 }
0242 };
0243 return factories;
0244 }
0245
0246
0247
0248
0249 template<class T>
0250 JFactoryT<T>* JEvent::GetSingle(const T* &t, const char *tag, bool exception_if_not_one) const {
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263 auto* databundle = GetLightweightDatabundle<T>(tag, true, true);
0264 if (databundle->GetSize() != 1) {
0265 t = nullptr;
0266 if (exception_if_not_one) {
0267 throw JException("GetSingle<%s>: Databundle has wrong number of items: 1 expected, %d found.", JTypeInfo::demangle<T>().c_str(), databundle->GetSize());
0268 }
0269 }
0270 else {
0271 t = databundle->GetData().at(0);
0272 }
0273 return dynamic_cast<JFactoryT<T>*>(databundle->GetFactory());
0274 }
0275
0276
0277
0278
0279
0280
0281
0282
0283 template<class T>
0284 JFactoryT<T>* JEvent::Get(const T** destination, const std::string& tag) const {
0285 auto* databundle = GetLightweightDatabundle<T>(tag, true, true);
0286 if (databundle->GetSize() == 0) {
0287 *destination = nullptr;
0288 }
0289 else {
0290 *destination = databundle->GetData().at(0);
0291 }
0292 return dynamic_cast<JFactoryT<T>*>(databundle->GetFactory());
0293 }
0294
0295
0296 template<class T>
0297 JFactoryT<T>* JEvent::Get(std::vector<const T*>& destination, const std::string& tag, bool strict) const
0298 {
0299 auto* databundle = GetLightweightDatabundle<T>(tag, strict, true);
0300 if (databundle != nullptr) {
0301 for (auto* item : databundle->GetData()) {
0302 destination.push_back(item);
0303 }
0304 }
0305 return dynamic_cast<JFactoryT<T>*>(databundle->GetFactory());
0306 }
0307
0308
0309
0310 template<class T>
0311 void JEvent::GetAll(std::vector<const T*>& destination) const {
0312 auto factories = GetFactoryAll<T>(true);
0313 for (auto factory : factories) {
0314 auto iterators = factory->CreateAndGetData(*this);
0315 for (auto it = iterators.first; it != iterators.second; it++) {
0316 destination.push_back(*it);
0317 }
0318 }
0319 }
0320
0321
0322
0323
0324
0325
0326
0327
0328
0329
0330
0331
0332 template<class T> const T* JEvent::GetSingle(const std::string& tag) const {
0333
0334 auto databundle = GetLightweightDatabundle<T>(tag, true, true);
0335 if (databundle->GetSize() == 0) {
0336 return nullptr;
0337 }
0338 return databundle->GetData().at(0);
0339 }
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349 template<class T> const T* JEvent::GetSingleStrict(const std::string& tag) const {
0350
0351 auto databundle = GetLightweightDatabundle<T>(tag, true, true);
0352 if (databundle->GetSize() == 0) {
0353 JException ex("GetSingle failed due to missing %d", NAME_OF(T));
0354 ex.show_stacktrace = false;
0355 throw ex;
0356 return nullptr;
0357 }
0358 else if (databundle->GetSize() > 1) {
0359 JException ex("GetSingle failed due to too many %d", NAME_OF(T));
0360 ex.show_stacktrace = false;
0361 throw ex;
0362 }
0363 return databundle->GetData().at(0);
0364 }
0365
0366 template<class T>
0367 std::vector<const T*> JEvent::Get(const std::string& tag, bool strict) const {
0368
0369 auto databundle = GetLightweightDatabundle<T>(tag, strict, true);
0370 std::vector<const T*> vec;
0371 if (databundle != nullptr) {
0372 for (auto x: databundle->GetData()) {
0373 vec.push_back(x);
0374 }
0375 }
0376 return vec;
0377 }
0378
0379 template<class T>
0380 typename JFactoryT<T>::PairType JEvent::GetIterators(const std::string& tag) const {
0381
0382 auto databundle = GetLightweightDatabundle<T>(tag, true, true);
0383 auto& data = databundle->GetData();
0384 return std::make_pair(data.cbegin(), data.cend());
0385 }
0386
0387
0388 template<class T>
0389 std::vector<const T*> JEvent::GetAll() const {
0390
0391 std::vector<const T*> results;
0392
0393 for (auto databundle : mFactorySet.GetDatabundles(std::type_index(typeid(T)))) {
0394 auto fac = databundle->GetFactory();
0395 if (fac != nullptr) {
0396 fac->Create(*this);
0397 }
0398 auto typed_databundle = dynamic_cast<JLightweightDatabundleT<T>*>(databundle);
0399 if (typed_databundle != nullptr) {
0400 for (auto* item : typed_databundle->GetData()) {
0401 results.push_back(item);
0402 }
0403 }
0404 }
0405 return results;
0406 }
0407
0408
0409
0410
0411
0412
0413 template<class S>
0414 std::map<std::pair<std::string, std::string>, std::vector<S*>> JEvent::GetAllChildren() const {
0415 std::map<std::pair<std::string, std::string>, std::vector<S*>> results;
0416 for (JDatabundle* databundle: mFactorySet.GetAllDatabundles()) {
0417 auto val = databundle->GetAs<S>();
0418 if (!val.empty()) {
0419 auto key = std::make_pair(databundle->GetTypeName(),
0420 databundle->HasShortName() ? databundle->GetShortName() : databundle->GetUniqueName());
0421 results.insert(std::make_pair(key, val));
0422 }
0423 }
0424 return results;
0425 }
0426
0427
0428
0429
0430
0431
0432
0433 template <class T>
0434 inline JFactoryT<T>* JEvent::Insert(T* item, const std::string& tag) const {
0435
0436 auto* databundle = GetLightweightDatabundle<T>(tag, false, false);
0437
0438 if (databundle == nullptr) {
0439 auto* factory = new JFactoryT<T>;
0440 factory->SetTag(tag);
0441 factory->SetLevel(mFactorySet.GetLevel());
0442 mFactorySet.Add(factory);
0443 databundle = GetLightweightDatabundle<T>(tag, false, false);
0444 }
0445
0446 databundle->SetStatus(JDatabundle::Status::Inserted);
0447 databundle->GetData().push_back(item);
0448
0449 auto* factory = databundle->GetFactory();
0450 if (factory != nullptr) {
0451 factory->SetStatus(JFactory::Status::Inserted);
0452 factory->SetInsertOrigin( mCallGraph.GetInsertDataOrigin() );
0453 return dynamic_cast<JFactoryT<T>*>(factory);
0454 }
0455 throw JException("Attempted to call JEvent::Insert without an underlying JFactoryT. Hint: Did you previously use Output<T>?");
0456
0457 }
0458
0459 template <class T>
0460 inline JFactoryT<T>* JEvent::Insert(const std::vector<T*>& items, const std::string& tag) const {
0461
0462 auto* databundle = GetLightweightDatabundle<T>(tag, false, false);
0463
0464 if (databundle == nullptr) {
0465 auto* factory = new JFactoryT<T>;
0466 factory->SetTag(tag);
0467 factory->SetLevel(mFactorySet.GetLevel());
0468 mFactorySet.Add(factory);
0469 databundle = GetLightweightDatabundle<T>(tag, false, false);
0470 }
0471
0472 databundle->SetStatus(JDatabundle::Status::Inserted);
0473 databundle->GetData() = items;
0474
0475 auto* factory = databundle->GetFactory();
0476 if (factory != nullptr) {
0477 factory->SetStatus(JFactory::Status::Inserted);
0478 factory->SetInsertOrigin( mCallGraph.GetInsertDataOrigin() );
0479 return dynamic_cast<JFactoryT<T>*>(factory);
0480 }
0481 throw JException("Attempted to call JEvent::Insert without an underlying JFactoryT. Hint: Did you previously use Output<T>?");
0482
0483 }
0484
0485
0486
0487 #if JANA2_HAVE_PODIO
0488
0489 inline std::vector<std::string> JEvent::GetAllCollectionNames() const {
0490 std::vector<std::string> unique_names;
0491 for (auto databundle : mFactorySet.GetAllDatabundles()) {
0492 if (dynamic_cast<JPodioDatabundle*>(databundle) != nullptr) {
0493 unique_names.push_back(databundle->GetUniqueName());
0494 }
0495 }
0496 return unique_names;
0497 }
0498
0499 inline const podio::CollectionBase* JEvent::GetCollectionBase(std::string unique_name, bool throw_on_missing) const {
0500 auto* bundle = mFactorySet.GetDatabundle(unique_name);
0501 if (bundle == nullptr) {
0502 if (throw_on_missing) {
0503 throw JException("Missing databundle with uniquename '%s'", unique_name.c_str());
0504 }
0505 return nullptr;
0506 }
0507
0508 auto* typed_bundle = dynamic_cast<JPodioDatabundle*>(bundle);
0509 if (typed_bundle == nullptr) {
0510 if (throw_on_missing) {
0511 throw JException("Databundle with uniquename '%s' is not a JPodioDatabundle", unique_name.c_str());
0512 }
0513 return nullptr;
0514 }
0515
0516 if (typed_bundle->GetStatus() == JDatabundle::Status::Empty || typed_bundle->GetStatus() == JDatabundle::Status::Excepted) {
0517 auto* fac = typed_bundle->GetFactory();
0518 if (fac != nullptr) {
0519 JCallGraphEntryMaker cg_entry(mCallGraph, fac);
0520 fac->Create(*this);
0521 }
0522 }
0523
0524 return typed_bundle->GetCollection();
0525 }
0526
0527
0528 template <typename T>
0529 const typename T::collection_type* JEvent::GetCollection(std::string name, bool throw_on_missing) const {
0530
0531 auto collection = GetCollectionBase(name, throw_on_missing);
0532 auto* typed_collection = dynamic_cast<const typename T::collection_type*>(collection);
0533 if (throw_on_missing && typed_collection == nullptr) {
0534 throw JException("Databundle with uniquename '%s' does not contain %s", name.c_str(), JTypeInfo::demangle<typename T::collection_type>().c_str());
0535 }
0536 return typed_collection;
0537 }
0538
0539
0540 template <typename T>
0541 void JEvent::InsertCollection(typename T::collection_type&& collection, std::string name) {
0542
0543
0544 if (name.empty()) {
0545 throw JException("JEvent::InsertCollection: Podio collection names must be non-empty!");
0546 }
0547
0548 podio::Frame* frame = nullptr;
0549 auto* bundle = mFactorySet.GetDatabundle("podio::Frame");
0550
0551 if (bundle == nullptr) {
0552
0553 frame = new podio::Frame();
0554 Insert(frame, "");
0555
0556
0557
0558 }
0559 else {
0560 JLightweightDatabundleT<podio::Frame>* typed_bundle = nullptr;
0561 typed_bundle = dynamic_cast<JLightweightDatabundleT<podio::Frame>*>(bundle);
0562 if (typed_bundle == nullptr) {
0563 throw JException("Databundle with unique_name 'podio::Frame' is not a JLightweightDatabundleT");
0564 }
0565 if (typed_bundle->GetSize() == 0) {
0566
0567 typed_bundle->GetData().push_back(new podio::Frame);
0568 typed_bundle->SetStatus(JDatabundle::Status::Inserted);
0569 }
0570 frame = typed_bundle->GetData().at(0);
0571 }
0572
0573 const auto& owned_collection = frame->put(std::move(collection), name);
0574 InsertCollectionAlreadyInFrame<T>(&owned_collection, name);
0575 }
0576
0577
0578 template <typename T>
0579 void JEvent::InsertCollectionAlreadyInFrame(const podio::CollectionBase* collection, std::string unique_name) {
0580
0581
0582
0583
0584 const auto* typed_collection = dynamic_cast<const typename T::collection_type*>(collection);
0585 if (typed_collection == nullptr) {
0586 mFactorySet.Print();
0587 throw JException("Attempted to insert a collection of the wrong type! name='%s', expected type='%s', actual type='%s'",
0588 unique_name.c_str(), JTypeInfo::demangle<typename T::collection_type>().c_str(), collection->getDataTypeName().data());
0589 }
0590
0591
0592 if (mUseDefaultTags && unique_name.empty()) {
0593 auto defaultTag = mDefaultTags.find(JTypeInfo::demangle<T>());
0594 if (defaultTag != mDefaultTags.end()) unique_name = defaultTag->second;
0595 }
0596
0597
0598
0599 JDatabundle* bundle = mFactorySet.GetDatabundle(unique_name);
0600 JPodioDatabundle* typed_bundle = nullptr;
0601
0602 if (bundle == nullptr) {
0603 typed_bundle = new JPodioDatabundle();
0604 typed_bundle->SetUniqueName(unique_name);
0605 typed_bundle->SetTypeIndex(std::type_index(typeid(T)));
0606 typed_bundle->SetTypeName(JTypeInfo::demangle<T>());
0607 mFactorySet.Add(typed_bundle);
0608
0609 }
0610 else {
0611 typed_bundle = dynamic_cast<JPodioDatabundle*>(bundle);
0612 if (typed_bundle == nullptr) {
0613 mFactorySet.Print();
0614 throw JException("Databundle with unique_name='%s' must be a JPodioDatabundle in order to insert a Podio collection", unique_name.c_str());
0615 }
0616 if (typed_bundle->GetStatus() != JDatabundle::Status::Empty) {
0617
0618 mFactorySet.Print();
0619 throw JException("A Podio collection with unique_name='%s' is already present and cannot be overwritten", unique_name.c_str());
0620 }
0621 }
0622
0623 typed_bundle->SetStatus(JDatabundle::Status::Inserted);
0624 typed_bundle->SetCollection(typed_collection);
0625 auto fac = typed_bundle->GetFactory();
0626 if (fac) {
0627 fac->SetStatus(JFactory::Status::Inserted);
0628 }
0629 }
0630
0631 #endif
0632
0633
0634