Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Subsection on Forcing Object Regeneration in JFactory Documentation #376

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/jana1to2/developers-transition-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,26 @@ for (auto hit: results){
Set(results)
```

### Forcing Factory to Regenerate Objects

##### **JANA1**
In JANA1, adding `use_factory` in the constructor forces the factory to regenerate objects, regardless of whether they already exist in the input file. This prevents JANA from searching the input file for those objects. For example:

```cpp
DEventWriterROOT_factory_ReactionEfficiency() {
use_factory = 1; // prevents JANA from searching the input file for these objects
};
```

##### **JANA2**
In JANA2, the `use_factory` flag is no longer used. To achieve the same functionality, the `SetRegenerateFlag` function must be called with `true` as the parameter. This will prevent JANA from searching the input file for these objects, similar to the behavior in JANA1. For example:

```cpp
DEventWriterROOT_factory_ReactionEfficiency() {
SetRegenerateFlag(true); // prevents JANA from searching the input file for these objects
};
```

## JEvent
### Transition from JEventLoop to JEvent
##### **JANA1**
Expand Down
Loading